<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!--RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<html>
<head>
<title>TreeAdaptor Test</title>
</head>
<body>
	<f:view>
		<a4j:form>
			<rich:panel id="collapsible" style="display:inline">
				<rich:panel id="treePanel" style="width:400px"  >
				<rich:togglePanel></rich:togglePanel>
					<rich:tree adviseNodeOpened="#{arborescenceBean.isOpen}" switchType="ajax" id="arbre">
						<rich:recursiveTreeNodesAdaptor id="recursive" roots="#{arborescenceBean.racine}" var="group" nodes="#{group.subGroups}">
							<rich:treeNode>
								<h:outputText value="#{group.mnemonic}" />
							</rich:treeNode>
							<rich:treeNodesAdaptor id="person" var="person" nodes="#{group.people}" >
								<rich:treeNode>
									<h:outputText value="#{person.mnemonic}"/>
								</rich:treeNode>
							</rich:treeNodesAdaptor>
						</rich:recursiveTreeNodesAdaptor>
					</rich:tree>
				</rich:panel>
				<rich:panel id="activator" onmouseover="#{rich:element('treePanel')}.show()" style="width:50px" >
					<h:commandButton value="Show/Hide" id="bShow"  onclick="return false" />
				</rich:panel>
				<rich:panel id="tableau" onmouseover="#{rich:element('treePanel')}.hide()" style="width:200px">
					<table border=1>
						<thead><tr><th>TeamId</th><th>mnemonic</th><th>adressee</th></tr></thead>
						<tbody>
							<tr><td>455666</td><td>ITEC/FCC/PCL Truc Management</td><td>Jean DUPONT</td>
							<tr><td>455666</td><td>ITEC/FCC/PCL Truc Management</td><td>Jean DUPONT</td>
						</tbody>
					</table>
					<rich:dataTable >
					</rich:dataTable>
				</rich:panel>
								
			</rich:panel>
		</a4j:form>
	</f:view>
</body>
</html>